package com.example.demo.service;

import com.example.demo.mapper.UserMapper;
import com.example.demo.model.UserInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: H_tao_X
 * Date: 2022-07-25
 * Time: 16:23
 */
@Service
public class UserService {

    // 属性注入,因为要是用 UserMapper 对象，如何是用，属性注入
    @Resource
    private UserMapper userMapper;

    public UserInfo getUserById(Integer id) {
        return  userMapper.getUserById(id);
    }
}
